Introduce archive feature for the submissions(in batch actions) - #3003
Conversation
Codecov ReportBase: 80.45% // Head: 80.35% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #3003 +/- ##
==========================================
- Coverage 80.45% 80.35% -0.10%
==========================================
Files 383 384 +1
Lines 18559 18718 +159
==========================================
+ Hits 14931 15041 +110
- Misses 3628 3677 +49
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
| MESSAGES.SKIPPED_REPORT: 'handle_skipped_report', | ||
| MESSAGES.REPORT_FREQUENCY_CHANGED: 'handle_report_frequency', | ||
| MESSAGES.BATCH_DELETE_SUBMISSION: 'handle_batch_delete_submission', | ||
| MESSAGES.BATCH_ARCHIVE_SUBMISSION: 'handle_batch_archive_submission', |
There was a problem hiding this comment.
Hold onto merging this as #2991 introduces changes in this.
d80b85d to
e09fa80
Compare
|
/rebased with PR #2991. I think, now we may put it to the test. |
|
Merged #2991 so changed base back to main for this PR. |
c5d8944 to
8a28e74
Compare
ec63d60 to
d4b5325
Compare
frjo
left a comment
There was a problem hiding this comment.
We hit blocking performance issue on larger datasets with the filter changes.
We have forgotten to add a unarchive batch function (we can do this in a separate PR if easier.)
|
|
||
| def get_used_rounds(request): | ||
| def get_used_rounds(request=None, queryset=None): | ||
| if queryset: |
There was a problem hiding this comment.
The queryset seems to always have a value.
Also on larger datasets all the "if queryset" versions crash the server with a "Proxy Error".
There was a problem hiding this comment.
The queryset seems to always have a value.
Actually, it is a bit tricky part, we are calling it from __init__ and updating the filter's field queryset to a value instead of a callable that's why it is not getting called internally from forms and it always has a queryset.
In the near future, if somebody removes any of the filter queryset update statement, it will get called internally and execute without queryset. That's why I put a check for queryset but if it is taking time, I think we can use separate methods for initialization and to update the filter's field queryset on the basis of the request's queryset.
There was a problem hiding this comment.
Also, queryset here has 2 reference, so it is a bit confusing. I'll change request's or view's 'queryset' to 'dataset' just for inside the table.
f3e4c63 to
2dd0d01
Compare
|
This needs a rebase and migration number update. |
8e21e92 to
70913cf
Compare
|
Rebased. @frjo migration number looks fine to me. Is it conflicting with any migration or PR? |
|
Main branch has And this PR has |
70913cf to
6c310d0
Compare
|
@frjo Migrations conflicts have been resolved. |
|
@theskumar @sandeepsajan0 There is som kind of issue with the migrations in this PR. I can replicate it with the sandbox db that is in the repo. But if I create a new and empty db I do not get this issue. Any ideas what the problem is? Trying to access http://apply.hypha.test/dashboard/ gives me this error:
|
|
@frjo Latest changes seem to be working fine for me locally. Let me know if the |
|
@sandeepsajan0 Seems to be working for me as well. Excellent work! How did you manage to track down the issue? |
|
It was just a combination of guesswork and trial & error with the changes. I also couldn't find an explanation yet why 'an extra distinct was causing the cursor issue'. That's why I wasn't sure and asked you if it is working for you as well. Whatever if it is fixed then we may move forward, I'll do a bit more research on it on weekend, and if I'll find something I'll post it here for the record. |
cfd9a85 to
ca45bd0
Compare
…ions, add settings for permissions
… to show/hide archived submissions
…se flex direction as row with align-items to center
2009474 to
6c8988c
Compare
Fixes #2996 - [x] Add archive function to batch action - [x] Make submission tables archive aware, possibility to toggle between all and active (unrachived) - [x] Optional permission so only staff admins can see archived submissions. Co-authored-by: Fredrik Jonsson <frjo@xdeb.org>
Fixes #2996 - [x] Add archive function to batch action - [x] Make submission tables archive aware, possibility to toggle between all and active (unrachived) - [x] Optional permission so only staff admins can see archived submissions. Co-authored-by: Fredrik Jonsson <frjo@xdeb.org>
Fixes #2996 - [x] Add archive function to batch action - [x] Make submission tables archive aware, possibility to toggle between all and active (unrachived) - [x] Optional permission so only staff admins can see archived submissions. Co-authored-by: Fredrik Jonsson <frjo@xdeb.org>

Fixes #2996